<template>
  <div class="footer">
    <div class="bottom">
      <div class="bot-item">
        <div>
          <img src="/index/djyh-new.png" />
          <h6>独家优惠</h6>
          <p>独家在线产品和特权</p>
        </div>
      </div>
      <div class="bot-item">
        <div>
          <img src="/index/zp-new.png" />
          <h6>独家优惠</h6>
          <p>独家在线产品和特权</p>
        </div>
      </div>
      <div class="bot-item">
        <div>
          <img src="/index/kd-new.png" />
          <h6>独家优惠</h6>
          <p>独家在线产品和特权</p>
        </div>
      </div>
      <div class="bot-item">
        <div>
          <img src="/index/gift-new.png" />
          <h6>独家优惠</h6>
          <p>独家在线产品和特权</p>
        </div>
      </div>
    </div>
    <div class="dingy">
      <p>订阅</p>
      <input
        type="text"
        placeholder="请输入邮箱"
        :class="{ red: inshow }"
        v-model="email"
        @blur="checkEmail"
      />
      <a>订阅</a>
      <span v-show="inshow">请输入有效邮箱</span>
      <van-checkbox v-model="checked" shape="square" class="check"
        >我同意依照本实用条款和隐私政策对我的个人信息进行收集和使用</van-checkbox
      >
    </div>
    <div class="guanz">
      <p>关注我们</p>
      <ul>
        <li>
          <span class="iconfont icon-weibo1"></span>
          <span>微博</span>
        </li>
        <li>
          <span class="iconfont icon-weixin1"></span>
          <span>微信</span>
        </li>
        <li>
          <span class="iconfont icon-douyin"></span>
          <span>抖音</span>
        </li>
        <li>
          <span class="iconfont icon-tushu"></span>
          <span>小红书</span>
        </li>
      </ul>
    </div>
    <div class="lianx">
      <p>联系我们</p>
      <span class="iconfont icon-dianhua"></span>
      <span>电话:400-820-6362</span>
    </div>
    <van-divider class="xian" />
    <div class="last">
      <p>
        国家药监局提示您：宣称用于祛斑美白、防晒、染发、烫发等的化妆品为特殊用途化妆品，产品标签上应标注“国妆特字”或者“国妆特进字”的标准文号。
      </p>
      <div class="oly">
        <p>© 欧莱雅（中国）有限公司</p>
        <a>
          <i class="iconfont icon--gongshangzhuce"></i>
          中国工商
        </a>
        <a>沪ICP备0810004-28</a>
        <p>
          <span class="iconfont icon--gongshangzhuce"></span>沪公网安备
          31010602001529号
        </p>
      </div>
      <div class="zuib">
        <ul>
          <li>Cookies政策</li>
          <li>使用条款</li>
          <li>隐私政策</li>
          <li>网站地图</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      inshow:false,
      email:'',
      checked:false
    }
  },
  methods: {
    checkEmail(){
      let reg=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
      if(!reg.test(this.email)){
        this.inshow=true
      }else{
        this.inshow=false
      }
    }
  },
}
</script>
<style lang="scss" scoped>
.footer {
  margin-top:50px;
  background-color: #000;
  color: white;
  .bottom {
    width: 100%;
    height: 320px;
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    .bot-item {
      width: 50%;
      height: 50%;
      border: 0.5px solid #272727;
      box-sizing: border-box;
      div {
        position: relative;
        top: 50%;
        transform: translateY(-50%);
        img {
          width: 40%;
        }
        h6 {
          padding: 0;
          margin: 3px 0;
        }
        p {
          padding: 0;
          margin: 0;
          font-size: 12px;
          color: rgba(255, 255, 255, 0.5);
        }
      }
    }
  }
  .dingy {
    width: 90%;
    margin: 10px auto;
    input {
      height: 25px;
      width: 73%;
      padding: 10px;
      border: 0;
      border-right: 1px solid black;
      color: #000;
    }
    .red {
      border: 1px solid red;
    }
    a {
      width: 14%;
      display: inline-block;
      background-color: white;
      color: #000;
      text-align: center;
      height: 25px;
      padding: 11px;
    }
    span {
      font-size: 12px;
      color: red;
    }
    .check {
      margin-top: 10px;
      font-size: 14px;
      color: white;
    }
  }
  .guanz {
    width: 90%;
    margin: 10px auto;
    ul {
      width: 100%;
      list-style: none;
      display: flex;
      justify-content: space-between;
      li {
        width: 25%;
        margin-left: 5px;
        span:nth-child(1) {
          color: rgba(255, 255, 255, 0.3);
        }
        span:nth-child(2) {
          color: rgba(255, 255, 255, 0.8);
          font-size: 14px;
          margin: 0 5px;
        }
      }
    }
  }
  .lianx {
    width: 90%;
    margin: 10px auto;
    span:nth-child(2) {
      font-size: 20px;
      color: rgba(255, 255, 255, 0.3);
    }
    span:nth-child(3) {
      color: rgba(255, 255, 255, 0.8);
      font-size: 16px;
      margin-left: 15px;
    }
  }
  .xian {
    width: 90%;
    margin: 20px auto;
  }
  .last {
    width: 90%;
    margin: 10px auto;
    text-align: center;
    p {
      color: rgba(255, 255, 255, 0.8);
      font-size: 13px;
    }
    .oly {
      p {
        padding: 0;
        margin: 5px 0;
      }
      a {
        font-size: 13px;
        color: rgba(255, 255, 255, 0.8);
      }
    }
    .zuib {
      margin-top: 10px;
      color: rgba(255, 255, 255, 0.8);
      font-size: 14px;
      ul {
        display: flex;
        justify-content: space-around;
      }
    }
  }
}
</style>
